import mysql from "../../db/index.js"

export const getAllClass= async (req,res)=>{
    try{
        let [data] = await mysql.query('select * from sys_class')
        res.send({
            status:0,
            msg:'数据请求成功',
            data
        })
    }catch(e){
        res.send({
            status:1,
            msg:'数据请求失败',
            data:e
        })
    }
}